package com.example.myapplication.util;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author: rongfeng
 * @date: 2022/1/6
 * @description
 */
public class Video {
    public static void main(String[] args) {
        String path = "D:\\dy\\toutiao\\11\\videoplayback (4)";
        Video video = new Video();
    }


    public void saveFile(String string, File file) {
        try {
            if (file.exists()) {
                file.delete();
                file.createNewFile();
            }
            BufferedWriter out = new BufferedWriter(new FileWriter(file));
            out.write(string);
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println("保存完成 ");
    }
}
